import request from '@/utils/request'

// 创建收货单
export function createReceiveOrder(data) {
  return request({
    url: '/hs/receive-order/create',
    method: 'post',
    data: data
  })
}

// 更新收货单
export function updateReceiveOrder(data) {
  return request({
    url: '/hs/receive-order/update',
    method: 'put',
    data: data
  })
}

// 删除收货单
export function deleteReceiveOrder(id) {
  return request({
    url: '/hs/receive-order/delete?id=' + id,
    method: 'delete'
  })
}

// 获得收货单
export function getReceiveOrder(id) {
  return request({
    url: '/hs/receive-order/get?id=' + id,
    method: 'get'
  })
}

// 获得收货单分页
export function getReceiveOrderPage(params) {
  return request({
    url: '/hs/receive-order/page',
    method: 'get',
    params
  })
}
// 导出收货单 Excel
export function exportReceiveOrderExcel(params) {
  return request({
    url: '/hs/receive-order/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}